<?php
	
	/* 
	--------------------------------------------------------------
	gm_meta.php 01.04.2008 pt
	Gambio OHG
	http://www.gambio.de
	Copyright (c) 2008 Gambio OHG
   Released under the GNU General Public License (Version 2)
   [http://www.gnu.org/licenses/gpl-2.0.html]
	--------------------------------------------------------------
	*/
	defined('_VALID_XTC') or die('Direct Access to this location is not allowed.');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
	<tr>
		<td valign="top" align="left" class="main">
			<b><?php echo MENU_TITLE_GM_META; ?></b> 
		</td>
		<td valign="top" align="right" class="main">
			<?php 
				echo gm_get_lang_link('gm_meta.php', 'gm_meta', '');
			?>
		</td>
	</tr>
	<?php if(!empty($gm_status)) { ?>
	<tr>
		<td valign="top" align="left" class="main">
			<?php echo $gm_status; ?>
		</td>
		<td valign="top" align="right" class="main">
			&nbsp;
		</td>
	</tr>
	<?php } ?>
</table>
<br />
<form method="post" action="<?php echo xtc_href_link('gm_meta.php', 'action=' . $_GET['action'] . '&lang_id=' . $lang_id); ?>">
	<table border="0" cellspacing="0" cellpadding="2" id="gm_table">
		
		<?php for($i = 0; $i < count($gm_values); $i++) {?>		
			<tr>
				<td valign="top" align="left" class="main" width="200">
					<?php 
						if(defined(str_replace('GM_META_', 'GM_META_TITLE_', $gm_values[$i]['gm_key']))) {
							echo constant(str_replace('GM_META_', 'GM_META_TITLE_', $gm_values[$i]['gm_key'])); 
						} else {
							echo $gm_values[$i]['gm_key'];
						}
					?>
				</td>
				<td valign="top" align="left" class="main">
					<textarea rows="1" style="width:400px;" name="<?php echo $gm_values[$i]['gm_key'];?>"><?php echo $gm_values[$i]['gm_value']; ?></textarea>
				</td>
				<td valign="top" align="left" class="main">
					<?php if($gm_values[$i]['gm_key'] != 'robots' && $gm_values[$i]['gm_key'] != 'keywords') { ?>
					<input type="checkbox" name="gm_delete[]" value="<?php echo $gm_values[$i]['gm_contents_id']; ?>">
					<?php echo GM_META_DELETE; ?>
					<?php } else { ?>					
					*
					<?php } ?>
				</td>
			</tr>
		<?php } ?>
		<tr>
			<td valign="top" align="left" class="main" width="200">
				&nbsp;
			</td>
			<td colspan="2" valign="top" align="left" class="main" width="200">
				<small>
					*<?php echo GM_META_REQUIRED; ?>
				</small>
			</td>
		</tr>
		<tr>
			<td valign="middle" align="left" class="main" colspan="3">				
				<input type="hidden" name="gm_lang" value="<?php echo $lang_id; ?>">																									 
				<input class="button" type="submit" name="gm_submit" value="<?php echo BUTTON_SAVE;?>">																									 
			</td>
		</tr>
	</table>
</form>